package com.ten.jinxiancun.controller;

import com.ten.jinxiancun.server.impl.PurchasepaymentsDetailServerImpl;
import com.ten.jinxiancun.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

//采购付款明细表
@RestController
@RequestMapping("/PurmentsDeta")
public class PurchasepaymentsDetailsController {
    @Autowired
    PurchasepaymentsDetailServerImpl purmentDe;
    @RequestMapping("/getAllPurMenDeta")
    public Object getAllPurMenDeta(@RequestParam Map<String,Object> map){
        Integer limit=Integer.parseInt(map.get("limit").toString());
        Integer page=Integer.parseInt(map.get("page").toString());
        map.put("limit",limit);
        map.put("page",(page-1)*limit);
        Result res=new Result("0","true",purmentDe.countFind(map),purmentDe.getAllPurMenDetaFind(map));
        return res;
    }
}
